package controller.admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractCommandController;

import Bean.memberBean;
import dao.memberDao;

public class deleteController extends AbstractCommandController {
	private memberDao dao;

	public void setDao(memberDao dao) {
		this.dao = dao;
	}

	@Override
	protected ModelAndView handle(HttpServletRequest request,
			HttpServletResponse response, Object obj, BindException error)
			throws Exception {

		memberBean bean = (memberBean) obj;
		ModelAndView mav = new ModelAndView();

		dao.Admindelete(bean);

		mav.setViewName("AdminMember");

		return mav;
	}
}
